/**
 * 
 */
package org.xlab.baseframework.webservice.api;

import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebService;

import org.xlab.baseframework.annotation.Security;
import org.xlab.baseframework.exception.PermissionDeniedException;
import org.xlab.baseframework.exception.SystemWebServiceSessionNotFoundException;

/**
 * @author makubex
 * 
 */
@WebService
public interface ISessionWebService {
	/**
	 * 尝试获取系统响应
	 * 
	 * @param sessionId 会话标识
	 * @param clientId 客户端标识
	 * @throws SystemWebServiceSessionNotFoundException 如果没有找到对应的session
	 * @throws PermissionDeniedException 如果该客户端无权访问该session
	 */
	@Security
	@WebMethod(operationName = "ping")
	public void ping(@WebParam(name = "sessionId") String sessionId,
			@WebParam(name = "clientId") String clientId)
			throws SystemWebServiceSessionNotFoundException,
			PermissionDeniedException;

	/**
	 * 简单登录系统，仅需要提供客户端标识即可登录系统
	 * 
	 * @param clientId 客户端标识
	 * @return 会话标识
	 */
	@WebMethod(operationName = "simpleLogin")
	public String simpleLogin(@WebParam(name = "clientId")String clientId);
}
